package com.gk.panda.apis.entity.largeScreen.Enum;


import com.gk.panda.apis.enums.BiodiversityEnum;

public enum OrgEnum {

    CHENGDU(1,"成都"),
    DAYI(6,"大邑"),
    DUJIANGYAN(8,"都江堰"),
    PENGZHOU(7,"彭州"),
    CHONGZHOU(5,"崇州"),
    ;


    private final Integer orgId;
    private final String name;

    OrgEnum(Integer orgId, String name) {
        this.orgId = orgId;
        this.name = name;
    }


    public Integer getOrgId() {
        return orgId;
    }

    public String getName() {
        return name;
    }

    public static String getNameByOrgId(Integer orgId) {
        OrgEnum[] values = OrgEnum.values();
        for (OrgEnum tmp : values){
            if (tmp.getOrgId().equals(orgId)){
                return tmp.getName();
            }
        }
        return null;
    }
}
